cmake_minimum_required(VERSION 3.15)

project(gmi LANGUAGES C CXX)

set(LIB_NAME Gmi)
set(EXE_NAME gmi)

set(C_STANDARD 11)
set(CXX_STANDARD 11)

# 为保证跨平台编译兼容，开启编译标准的强制要求
set_property(TARGET ${PROJECT} PROPERTY C_STANDARD_REQUIRED ON)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
	message(STATUS "Found CCache:" ${CCACHE_PROGRAM})
	set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
	set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_PROGRAM})
endif()

include(compile_option.cmake)

add_subdirectory(test)
add_subdirectory(source)
add_subdirectory(example)
# add_subdirectory(docgen)